package com.ebupt.migu.fineoperationactivitymonitor.common.entity;

import java.util.Objects;

import lombok.Getter;
import lombok.Setter;

@Getter
@Setter
public class StaticUser {
    String msisdn;
    String uid;
    String idfa;
    String imei;

    @Override
    public boolean equals(Object o) {
        if (this == o)
            return true;
        // 先判断o是否为本对象，this 指向当前的对象
        if (o == null || getClass() != o.getClass())
            return false;
        // 再判断o是否为null，和o.类对象和本类对象是否一致
        StaticUser user = (StaticUser)o;
        // 再把o对象强制转化为StaticUser类对象
        return Objects.equals(msisdn, user.msisdn) && Objects.equals(uid, user.uid) && Objects.equals(idfa, user.idfa)
            && Objects.equals(imei, user.imei);
        // 查看两个对象的name和sex属性值是否相等
    }

    @Override
    public String toString() {
        return "StaticUser{" + "msisdn='" + msisdn + '\'' + ", uid='" + uid + '\'' + ", idfa='" + idfa + '\''
            + ", imei='" + imei + '\'' + '}';
    }
}
